<?php

use yii\db\Migration;

/**
 * Class m190217_114700_fix_function_1
 */
class m190217_114700_fix_function_1 extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('job', 'hide', $this->tinyInteger(3));
        $this->addCommentOnColumn('job', 'hide', "取消发布");
        $this->addColumn('complaints', 'target_id', $this->string());
        $this->addCommentOnColumn('complaints', 'target_id', "举报目标id");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('job', 'hide');
        $this->dropColumn('complaints', 'target_id');
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m190217_114700_fix_function_1 cannot be reverted.\n";

        return false;
    }
    */
}
